package cn.qingyun.gis.modules.scenes.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;


@Data
@ApiModel(value = "上传文本请求对象", description = "上传文本请求对象")
public class UploadTextRequest {

    @Transient
    @NotNull(message = "上传文件不能为空~")
    @ApiModelProperty("上传文件")
    private MultipartFile file;

    @NotEmpty(message = "id不能为空~")
    @ApiModelProperty("id")
    private String id;

    @NotEmpty(message = "场景类型不能为空~")
    @ApiModelProperty("场景类型")
    private String type;

    @NotNull(message = "开始时间不能为空~")
    @ApiModelProperty("开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @NotNull(message = "结束时间不能为空~")
    @ApiModelProperty("结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @NotEmpty(message = "时间段不能为空~")
    @ApiModelProperty("时间段")
    private String timeSlot;

    @ApiModelProperty("附件表中的记录id")
    @NotEmpty(message = "序列主键不能为空！")
    private String proofreadId;
}
